//
//  MagicBeastsCell.m
//  iOSPractice
//
//  Created by hoolai on 2018/11/26.
//  Copyright © 2018年 hoolai. All rights reserved.
//

#import "MagicBeastsCell.h"

@interface MagicBeastsCell()
@property (weak, nonatomic) IBOutlet UILabel *IDView;
@property (weak, nonatomic) IBOutlet UILabel *atkView;
@property (weak, nonatomic) IBOutlet UILabel *defView;
@property (weak, nonatomic) IBOutlet UILabel *typeView;
@property (weak, nonatomic) IBOutlet UIImageView *headView;

@end
@implementation MagicBeastsCell

- (void)setBeast:(MagicBeastsModel *)beast{
    _beast = beast;
    
    self.IDView.text = [NSString stringWithFormat:@"ID:%ld",(long)beast.ID];
    self.atkView.text = [NSString stringWithFormat:@"攻击力:%ld",(long)beast.atk];
    self.defView.text = [NSString stringWithFormat:@"防御力:%ld",(long)beast.def];
    if([beast.type isEqualToString:@"magic"]){
        self.typeView.text = [NSString stringWithFormat:@"类型:魔法"];
    }else{
        self.typeView.text = [NSString stringWithFormat:@"类型:物理"];
    }
    self.headView.image = [UIImage imageNamed: beast.icon];
    
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


@end
